#include "junix.h"

long long
fib(long long n)
{
	if(n==0 || n==1)
		return n;

	long long l=0,h=1,t;
	int i;
	for(i=2;i<=n;++i)
	{
		t=h+l;
        l=h;
		h=t;
	}

	return h;
}

int main(int argc, char **argv)
{
	if(argc==1)
		err_quit("usage:%s interger",argv[0]);

	long long n=strtoll(argv[1],NULL,10);
	printf("%#.llX\n",fib(n));

	return 0;
}

